home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / doom / ldhe-src.0 / ldhe-src / dehacked / source / utils / x11 / xinstallfont.sh < prev   
Encoding:
Text File  |  1995-04-10  |  1.6 KB  |  43 lines

  1. # This script installs the Xwindows VGA font. This should be run as root 
  2. # if the Xwindows directories are writeable only by root.
  3. #
  4. # Please mail comments or improvements to Mark Rejhon at this Email address:
  5. # ag115@freenet.carleton.ca
  6.  
  7. X11ROOTDIR=/usr
  8.  
  9. # Test for existence of X11
  10. if ! [ -e $X11ROOTDIR/lib/X11 ]; then
  11.     echo "This system doesn't have a $X11ROOTDIR/lib/X11 directory!"
  12.     echo "Perhaps you don't have Xwindows installed?"
  13.  
  14. # Test for existence of pc8x8.pcf in current directory
  15. elif ! [ -r ./pc8x8.pcf ]; then
  16.     echo "Where's the VGA font file, 'pc8x8.pcf'?  It's not in the current directory!"
  17.     echo "Please run this script in the DOSEMU source directory."
  18.  
  19. # Test the existence of $X11ROOTDIR/lib/X11/fonts/misc
  20. elif ! [ -e $X11ROOTDIR/lib/X11/fonts/misc ]; then
  21.     echo "There is no $X11ROOTDIR/lib/X11/fonts/misc directory to install the VGA font in!"
  22.  
  23. # Test for writeability of $X11ROOTDIR/lib/X11/fonts/misc
  24. elif ! [ -w $X11ROOTDIR/lib/X11/fonts/misc ]; then
  25.     echo "The $X11ROOTDIR/lib/X11/fonts/misc directory is not writeable by you!"
  26.     echo "This script should be executed as root, to install the VGA font file."
  27.  
  28. # Else, go ahead and try to install the font.
  29. else
  30.     echo "Installing VGA font for Xwindows..."
  31.     install -m 644 pc8x8.pcf $X11ROOTDIR/lib/X11/fonts/misc/
  32.     cd $X11ROOTDIR/lib/X11/fonts/misc
  33.     echo "Recompiling font table with 'mkfontdir'..."
  34.     mkfontdir
  35.     if ! [ $? -eq 0 ]; then
  36.         echo "ERROR: Could not execute 'mkfontdir'.  VGA font not installed."
  37.     else
  38.         echo ""
  39.         echo "If you are in X now, you need to reset or restart X windows to recognize"
  40.         echo "the newly added font file."
  41.     fi
  42. fi
  43.